package chessGame.move;

import chessGame.utils.MoveUtils;
import chessLib.Position;

import java.util.Collection;

/**
 * @BelongsProject: chessGame
 * @BelongsPackage: chessGame.move
 * @CreateTime: 2025-10-08  21:15
 * @Description: TODO
 * @Version: 1.0
 */
public class RookMoveStrategy implements MoveStrategy{
    // 车可以水平和垂直移动
    int[][] directions = {{-1, 0},  {1, 0}, {0, -1}, {0, 1}};
    @Override
    public Collection<Position> validMovesFor(Position pos) {
        return MoveUtils.pieceMoves(pos,directions);
    }
}
